home *** CD-ROM | disk | FTP | other *** search
- /* XDocument.h
- *
- * This is the root document class.
- *
- * The way the document works is to insert itself in the XGDispatch
- * list between the XGAppCore class and the XGWindow which displays
- * the document's contents.
- *
- * A document then can watch incomming messages and help regulate
- * how those messages are handled
- */
-
- /* YAAF - Yet another application framework
- * Copyright (C) 1997 William Edward Woody and In Phase Consulting
- *
- * This library is free software; you can redistribute it
- * and/or modify it under the terms of the GNU Library
- * General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or any
- * later version.
- *
- * This library is distributed in the hope that it will be
- * useful, but WITHOUT ANY WARRANTY; without even the implied
- * warranty of MERCHANTABIILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Library General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Library General
- * Public License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * To contact the author, either e-mail me at
- * woody@alumni.caltech.edu, or write to us at
- *
- * William Edward Woody
- * In Phase Consulting
- * 1545 Ard Eevin Avenue
- * Glendale, CA 91202
- */
-
- #ifndef __XDOCUMENT_H__
- #define __XDOCUMENT_H__
-
- #include <XEvent.h>
-
- #if defined(__MWERKS__)
- #if defined(macintosh)
- #pragma options align=power
- #endif
- #if defined(__INTEL__)
- #pragma pack(push,2)
- #endif
- #endif
-
- /************************************************************************/
- /* */
- /* Randomness */
- /* */
- /************************************************************************/
-
- class XGWindow;
-
- /************************************************************************/
- /* */
- /* Dirty/Save Support */
- /* */
- /************************************************************************/
-
- /* XGDocument
- *
- * This is the basic document class.
- */
-
- class XGDocument : public XGDispatch {
- public:
- XGDocument();
- virtual ~XGDocument();
-
- /*
- * Document save/restore hooks
- */
-
- virtual bool IsNamed() = 0;
- virtual bool IsDirty() = 0;
- virtual bool DoSave() = 0;
- virtual bool DoSaveAs() = 0;
- virtual void DoRevert() = 0;
-
- /*
- * Message processing
- */
-
- long ReceiveDispatch(long,long,void *);
- };
-
-
-
- #if defined(__MWERKS__)
- #if defined(macintosh)
- #pragma options align=reset
- #endif
- #if defined(__INTEL__)
- #pragma pack(pop)
- #endif
- #endif
-
- #endif /* __XDOCUMENT_H__ */
-